package projects.ufam.nodes.messages;

import sinalgo.nodes.Node;
import sinalgo.nodes.NodeState;
import sinalgo.nodes.messages.Message;

public class GAFMessage extends Message {
	private int id;
	private int gridId;
	private double enat;
	private NodeState state;

	public GAFMessage(Node origin, int gridId) {
		this.sender = origin;
		this.id = origin.ID;
		this.gridId = gridId;
		this.enat = origin.getEnergyLevel();
		this.state = origin.getState();
	}

	@Override
	public Message clone() {
		return new GAFMessage(sender, gridId);
	}

	@Override
	public int getMessageSize() {
		return 1; // Rough estimate
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getGridId() {
		return gridId;
	}

	public void setGridId(int gridId) {
		this.gridId = gridId;
	}

	public double getEnat() {
		return enat;
	}

	public void setEnat(double enat) {
		this.enat = enat;
	}

	public NodeState getState() {
		return state;
	}

	public void setState(NodeState state) {
		this.state = state;
	}
	
}